<?php
    defined('M2_MICRO') or die('Direct Access to this location is not allowed.');

    /**
      * @desc View class
      * @package M2 Micro Framework
      * @author Alexander Chaika
      */
    class View extends Error {

        /**
          * Class constructor
          */
        public function  __construct() {
        }
        
        /**
          * Render action
          * @param array $options
          */
        public function render($options) {
            global $config;
            $options['template'] = $config['template'];
            include $config['doc_root'].'/templates/'.$config['template'].'/index.php';
        }

        /**
          * Offline action
          * @param array $options
          */
        public function offline() {
            global $config;
            include $config['doc_root'].'/templates/offline/index.php';
        }
    }
?>
